
// var paramsJson = {
//   url:'',
//   headers:{"Authorization": 'Bearer '+ this.internalData.tenant_access_token},
//   data:{
//     ranges:['0b1422!A1:CZ999']
//   }
// }; 
console.log('传参', request.params)
let params = request.params
var qinqiu = require('request');

let app_id = "cli_a225774de838500b"
let app_secret = "CtpnHHHo9NXBYaNhxiTzbeMBVXBesl1L"
let url01 = 'https://open.feishu.cn'

let obj = {
    text: '测试',
}

const readFile = function () {
    return new Promise(function (resolve, reject) {
        var p_data = {
            url: params.url,
            method: params.method || "GET",
            headers: {
                "content-type": "application/json",
                ...params.headers
            },
            form: params.data,
            ...params.params_obj
        }

        if (params.dataType) {
            p_data.dataType = params.dataType
        } 

        qinqiu(p_data, function (error, response, body) {

            resolve(response)

            // if (!error && response.statusCode == 200) {
            //     // console.log(body) // 请求成功的处理逻辑，注意body是json字符串
            //     resolve(response)
            // } else {
            //     resolve(response)
            // }
        });
    });
};



return await readFile()